package cn.wolfcode.edu.service.impl;

import cn.wolfcode.edu.domain.Calendar;
import cn.wolfcode.edu.mapper.CalendarMapper;
import cn.wolfcode.edu.service.ICalendarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CalendarServiceImpl implements ICalendarService {
    @Autowired
    private CalendarMapper calendarMapper;
    public List listAll() {
        return calendarMapper.selectAll();
    }

    public void change(Calendar calendar) {
        calendarMapper.updateByPrimaryKey(calendar);
    }

    public Calendar get(Long id) {
        return calendarMapper.selectByPrimaryKey(id);
    }

    public void save(Calendar calendar) {
        calendarMapper.insert(calendar);
    }
}
